#!/usr/bin/env python
# encoding: utf-8
"""
@author: youfeng
@email: youfeng243@163.com
@license: Apache Licence 
@file: parse_anhui.py
@time: 2016/12/22 15:07
"""
from parse.base_object import ParseObject


class prase_object_xizang(ParseObject):
    def __init__(self, **kwargs):
        ParseObject.__init__(self, **kwargs)

    def get_base_info(self, url, item=None):

        try:
            tail = url.split('?')[1]
            param_list = tail.split('&')
            base_info = {}
            for item in param_list:
                split_list = item.split('=')
                base_info[split_list[0]] = split_list[1]
        except Exception as e:
            self.log.exception(e)
            return None

        return base_info
